<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
	<th:block th:include="include/include :: header('修改角色')" />	
	<th:block th:include="include/include :: ztree-css" />
</head>
<body class="white-bg">
	<div class="wrapper wrapper-content animated fadeInRight ibox-content">
		<form class="form-horizontal m" id="editForm" th:action="@{/admin/role}" th:object="${viewobject}">
			<input type="hidden" id="roleId" th:field="*{roleId}"/>
			<input type="hidden" name="oper" id="oper" th:value="${oper}"/>
			<input type="hidden" id="dsScope" name="dsScope" th:value="*{dsScope}"/>
			<div class="form-group">
				<label class="col-sm-3 control-label is-required">角色名称：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="roleName" id="roleName" th:field="*{roleName}" maxlength="30">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label is-required">角色编码：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="roleCode" id="roleCode" th:field="*{roleCode}" maxlength="30" th:readonly="${oper}!='add'">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">角色描述：</label>
				<div class="col-sm-8">
					<textarea class="form-control" rows="3" maxlength="30" th:field="*{roleDesc}"></textarea>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">数据范围：</label>
				<div class="col-sm-8">
					<select id="dsType" th:field="*{dsType}" class="form-control m-b">
						<option value="0">全部</option>
						<option value="2">本级及子级</option>
						<option value="3">本级</option>
						<option value="1">自定义</option>
					</select>
					<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 特殊情况下，设置为“自定义数据权限”</span>
				</div>
			</div>
			<div class="form-group" id="authDataScope" th:style="'display:' + @{(*{dsType==1} ? 'block' : 'none')} + ''">
				<label class="col-sm-3 control-label">数据权限</label>
				<div class="col-sm-8">
					<div id="deptTrees" class="ztree"></div>
				</div>
			</div>
		</form>
	</div>
	<th:block th:include="include/include :: footer" />
	<th:block th:include="include/include :: ztree-js" />
	<script th:src="@{/pages/sysadm/role/roleEdit.js}"></script>
</body>
</html>
